home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Comm / www / tidy_os4.lha / tidy / build / rpm / tidy.spec < prev   
Text File  |  2004-07-25  |  5KB  |  188 lines

  1. #
  2. # Tidy version is 02 Oct 2003 that is 10022003
  3. # First edit this file and set the version number
  4. # You need to unpack the original source and edit the Makefile
  5. # and point the prefix as follows:
  6. #    runinst_prefix=${RPMTMP}
  7. #    devinst_prefix=${RPMTMP}
  8. # Copy this source tidy-MMDDYYYY.tgz to directory /usr/src/redhat/SOURCES
  9. #
  10. ####################################################################
  11. # To Build the new RPM package for tidy_rpm, to be uploaded 
  12. # to ftp.redhat.com do the following:-
  13. #  cd /usr/src/redhat; mkdir -p BUILD SRPMS RPMS/i386
  14. #
  15. #  Use the following commands - see 'man rpm' and 'man rpmbuild'
  16. #  rpmbuild --showrc
  17. #  To prep : rpmbuild --short-circuit -bp /usr/src/redhat/SPECS/tidy_rpm*.spec
  18. #  Build   : rpmbuild --short-circuit -bc 
  19. #  Install : rpmbuild --short-circuit -bi 
  20. #  List    : rpmbuild --short-circuit -bl
  21. #  Bin/Src : rpmbuild -ba
  22. #  Build from TAR gzip source code with : rpmbuild -ta tidy.tar.gz
  23. ####################################################################
  24. ##
  25. ##  Preamble:
  26. ##
  27. Summary: tidy - Program for tidying up messy HTML files
  28. Name: tidy
  29.  
  30. # Version is 2 Oct 2003 - 10022003
  31. Version: 02October2003
  32. Release: 1
  33. Copyright: GPL
  34. Group: Applications/Tools
  35. %define mainurl http://tidy.sourceforge.net
  36. %define source_code_name  %{name}_src.tgz
  37. %define url http://tidy.sourceforge.net
  38. %define builddir  $RPM_BUILD_DIR/%{name}-%{version}
  39.  
  40.  
  41. # You cannot have $$ (process id)in rpmtmp below since it will 
  42. # be different for install and build sections
  43. %define rpmtmp  $RPM_BUILD_DIR/rpm_tmp_directory-%{name}-%{version}-%{release}
  44.  
  45. #Source0: %{url}/%{name}-%{version}.tgz
  46. Source0: %{url}/%{source_code_name}
  47. #Source1: %{name}.init
  48. #Source2: %{name}-%{version}.tgz
  49. #Patch0: %{name}-%{version}-rh.patch
  50. #Patch1: %{name}-%{version}-teo.patch
  51. Packager:  Al Dev alavoor[at]yahoo.com
  52. Buildroot: /var/tmp/%{name}-root
  53. BuildArchitectures: noarch
  54. #Prereq: /sbin/chkconfig /sbin/ldconfig /usr/sbin/useradd
  55. Prereq: /usr/sbin/useradd
  56. Url: %{url}
  57. #Requires: %{name}
  58. Summary(de): %{name} german-summary
  59. Summary(fr): %{name} french-summary
  60. Summary(tr): %{name} turkey-summary
  61.  
  62. ##
  63. ##  Description
  64. ##
  65. %description
  66. %{name}: The tidy is a program for tidying up messy HTML files. 
  67. When editing HTML its easy to make mistakes. Would not it be nice if 
  68. there was a simple way to fix these mistakes automatically and tidy up 
  69. sloppy editing into nicely layed out markup? Dave Raggetts HTML TIDY 
  70. is a free utility for doing just that. It also works great on the 
  71. atrociously hard to read markup generated by specialized HTML editors 
  72. and conversion tools, and can help you identify where you need to pay 
  73. further attention on making your pages more accessible to people 
  74. with disabilities.
  75.  
  76.  
  77.  
  78. ##
  79. ##  Prep section:
  80. ##
  81. %prep
  82. rm -rf $RPM_BUILD_ROOT
  83. %setup -q
  84. #%patch0 -p1 -b .rh
  85.  
  86. ##
  87. ##  Build section:
  88. ##
  89. %build
  90.   echo "In build section ..."
  91.   cd %{builddir}; 
  92.   rm -rf %{rpmtmp}
  93.   mkdir -p %{rpmtmp}
  94.   export RPMTMP=%{rpmtmp}  # So that you can access from Makefiles with $(RPMTMP)
  95.   #pwd && ./configure --prefix=%{rpmtmp}
  96.   # If there is no configure then 
  97.   # Should modify your Makefile using $(RPMTMP)
  98.   pwd
  99.   cd %{builddir}/build/gmake; 
  100.   make all && make && make install
  101. )
  102. #( cd $RPM_BUILD_DIR; pwd && tar xzf %{builddir}.tgz )
  103.  
  104.  
  105.  
  106. ##
  107. ##  Install section:
  108. ##
  109. %install
  110. rm -rf $RPM_BUILD_ROOT
  111. PATH=/usr/sbin:$PATH 
  112. #useradd -M -r -d /var/lib/%{name} -s /bin/bash \
  113. #    -c "wvware package" %{name} || :
  114. (
  115.     # For maintaining separate versions of packages do ...
  116.     #mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}/%{version}
  117.     #cd $RPM_BUILD_ROOT/var/lib/%{name}/%{version}
  118.     #cp -pr %{rpmtmp}/*  .
  119.     #( cd $RPM_BUILD_ROOT/var/lib/%{name}; ln -s %{version} current )
  120.  
  121.     # Or alternatively copy to default locations as below...
  122.     mkdir -p $RPM_BUILD_ROOT/usr
  123.     cd $RPM_BUILD_ROOT
  124.     mv %{rpmtmp}/* $RPM_BUILD_ROOT/usr
  125.  
  126.     #chown -R %{name}.%{name} *
  127.     chmod -R 644 *  # read for all and write for user
  128.     find . -type d -exec chmod a+rx {} \;
  129.     find . -type f -name "*.so" -exec chmod a+rx {} \;
  130.     #chmod a+rx run-%{name}  # read for all and write for user
  131. )
  132.  
  133. ##
  134. ##  Pre-install section:
  135. ##
  136. %pre
  137. #useradd -M -o -r -d /var/lib/%{name} -s /bin/bash \
  138. #    -c "tidy Package" %{name} >/dev/null 2>&1 || :
  139.  
  140. #%post -p /sbin/ldconfig
  141.  
  142. #%postun -p /sbin/ldconfig clients
  143.  
  144. #%preun
  145. #if [ $1 = 0 ] ; then
  146. #    chkconfig --del %{name}
  147. #fi
  148.  
  149. #%postun
  150. #/sbin/ldconfig
  151. #if [ $1 = 0 ] ; then
  152. #    userdel %{name} >/dev/null 2>&1 || : 
  153. #fi
  154.  
  155. ##
  156. ##  Clean section:
  157. ##
  158. %clean
  159. rm -rf $RPM_BUILD_ROOT
  160. rm -rf %{rpmtmp}
  161.  
  162. ##
  163. ##  Files section:
  164. ##
  165. # ----> These are files in the %{name}-x.x.x.rpm package
  166. %files
  167. #%defattr(-,%{name},%{name})
  168. #%defattr(-,root,root)
  169. #%config /etc/rc.d/init.d/*
  170. #%doc doc/*.ps.gz
  171. #%doc howto
  172. #
  173. # Use either /, or /usr or /var as below :
  174. /
  175. #
  176. # ----> These are files in the %{name}-data-*.rpm package
  177. #%files data
  178. #%attr(-,%{name},%{name}) %dir /var/lib/%{name}
  179. #%attr(-,%{name},%{name}) %config /var/lib/%{name}/*
  180. #/usr/bin/somefilename
  181.  
  182. ################################################################
  183. %changelog
  184. * Mon Oct 25 2003 Al Dev (Alavoor Vasudevan) <alavoor[at]yahoo.com>
  185. - Initial version of %{name} rpm
  186. ################################################################
  187.